import http from "@/utils/http2.js";
/**
 * 查询所有产品
 * @param {*} type
 * @returns
 */
export function queryAll() {
  return http.get("/v1/product/all");
}
/**
 * 分页查询
 * @param {*} data
 * @returns
 */
export function queryProduct(data) {
  return http.post("/v1/product/query", data);
}
/**
 * 查询产品分类
 * @param {*} type
 * @returns
 */
export function queryCategory() {
  return http.get("/v1/product/category");
}

export function queryCustomerProduct(data) {
  return http.post("/v1/product/cust", data);
}

export function updateStatus(id, status) {
  return http.put("/v1/product/status?id=" + id + "&status=" + status);
}

export function deleteProduct(id) {
  return http.delete("/v1/product", id);
}
export function saveProduct() {
  return http.post("/v1/product");
}


